package com.itwn.portal.mapper;

import com.itwn.portal.entity.Report;
import org.apache.ibatis.annotations.Insert;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface ReportMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Report record);

    Report selectByPrimaryKey(Integer id);

    List<Report> selectAll();

    int updateByPrimaryKey(Report record);

    @Insert("insert into t_report (remark_id,resource_id,report_text,report_user_id,report_time,status,report_type,img_url)" +
            " values (#{remarkId},#{resourceId},#{reportText},#{reportUserId},#{reportTime},#{status},#{reportType}" +
            ",#{imgUrl})")
    int insertReport(Report report);
}